#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
	int i, num = 0, alp = 0, oth = 0, max;
	char a[10];
	while (rewind(stdin), scanf("%s", a) != 0) {
		num = 0, alp = 0, oth = 0, max = 0;
		for (i = 0; a[i] != '\0'; i++) {
			if (a[i] >= '0' && a[i] <= '9') {
				num++;
			}
			else if (a[i] >= 'a' && a[i] <= 'z' || a[i] >= 'A' && a[i] <= 'Z') {
				alp++;
			}
			else
				oth++;
		}
		max = (alp > num ? alp : num) > oth ? (alp > num ? alp : num) : oth;
		for (i = max; i >= 0; i--) {
			if (alp == i) {
				printf("%5d     ", i);
			}
			else if (alp > i)
			{
				printf("  *****   ");
			}
			else if (alp < i) {
				printf("          ");
			}
			if (num == i) {
				printf("%5d   ", i);
			}
			else if (num > i)
			{
				printf("  *****   ");
			}
			else if (num < i) {
				printf("          ");
			}
			if (oth == i) {
				printf("%5d   \n", i);
			}
			else if (oth > i)
			{
				printf("  *****   \n");
			}
			else if (oth < i) {
				printf("          \n");
			}
		}
		printf("   alp       num       oth");

	}
	system("pause");
	return 0;
}